package br.com.foxline.atlasmobile.dao;

import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import com.j256.ormlite.dao.GenericRawResults;

import android.content.Context;
import br.com.foxline.atlasmobile.entities.City;

public class CityDao  extends GenericDao<City>{
	
	private Context context;

	public CityDao(Context context) {
		super(context, new City());
	}
	
	public City getCity(String cidade){
		City result = null;
		
		try {
			result = getDao().queryBuilder().where().eq("name", cidade).queryForFirst();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		
		return result;
	}

}
